<!-- 文书模板列表 -->
<template>
  <div class="page-box h100 display-flex czbj">
    <p class="title-label">文书模板列表</p>
    <div class="btm mt10 pt10">
      <dxtable
        :dataJson="dataJson"
        :portUrl="portUrl"
        :qx="qx"
        :sonRouter="sonRouter"
        ref="databale"
        bjtext="修改"
      ></dxtable>
    </div>
  </div>
</template>
 <script lang='ts' setup>
import dxtable from "../../components/util/dxtable.vue";
import sort from "../../components/util/sort.vue";
import {hf } from "../../util/index";
import { h, ref, reactive } from "vue";
const databale = ref();
const sonRouter = "newTemplate";
const initeer = () => {
  databale.value.initDataExpose();
};

// 弹窗公用该列表
let dataJson = reactive([
  {
    title: "模板名称",
    key: "name",
    search: true, // 是否在搜索栏展示
  },
  {
    title: "模板类型",
    key: "templateTtpe",
    search: true, // 是否在搜索栏展示
    type: "select",
    options: [
      {
        label: "全部",
        value: null,
      },
      {
        label: "表格",
        value: 1,
      },
      {
        label: "表单",
        value: 2,
      },
    ],
    render(row) {
      return row.templateTtpe==1?'表格':'表单';
    },
  },
  {
    title: "排序",
    width: 100,
    render(row) { 
      row.databaseName = "hltemplateList";
      return h(sort, {
        row,
        onCallBack: () => {
          initeer();
        },
      });
    },
  },
  {
    title: "创建时间",
    key: "addTime",
    width: "200",
    type: "daterange",
  },
]);
let portUrl = "huli/hltemplateList";
const qx = {
  DeletePermissionID: "writListdel", //删除
  EditPermissionIdentifier: "writListbj", // 编辑
  NewPermissionIdentifier: "writListxz", // 新建
  ViewPermissionID: "writListck", // 查看
};


</script>
 <style scoped>
</style>


